package practicedemo37;

import java.util.Scanner;

public class PracticeDemo37 {
    public static void main(String[] args) {
        //字符串的反转

        //1.键盘输入
        Scanner sc = new Scanner(System.in);
        System.out.println("输入字符串");
        String arr = sc.next();

        //2.遍历
        for (int i = arr.length()-1; i >= 0; i--) {
            char c = arr.charAt(i);
            System.out.print(c);
        }
    }
}
